﻿<UserControl x:Class="Airborne.ScrumPoker.Module.ProductOwner.Views.WorkItemDetailView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             mc:Ignorable="d" 
             d:DesignWidth="423.723" 
             d:DesignHeight="245.84" Height="240">
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="35" />
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="65"/>
            <RowDefinition Height="35"/> 
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition MinWidth="290" />
        </Grid.ColumnDefinitions>
        <Border  Grid.Column="0" Grid.ColumnSpan="2" Background="#FF393F48" VerticalAlignment="Stretch" Grid.Row="0" >
            <TextBlock AutomationProperties.AutomationId="textBlockWorkItemTitle" HorizontalAlignment="Center" Margin="0,0,10,0" VerticalAlignment="Center" Height="Auto" Foreground="#FFFFFFFF" TextWrapping="Wrap" FontWeight="Bold" Text="{Binding Path=Title}"/>
        </Border>
        <StackPanel Orientation="Horizontal" Margin="0,0,0,8" Height="Auto" Grid.ColumnSpan="2" Grid.Row="1">
            <StackPanel Orientation="Horizontal" >
                <TextBlock Text="Business Priority:" Margin="2,2,2,2" HorizontalAlignment="Right" Foreground="#FF4B4B62"/>
                <TextBlock Text="{Binding Path=BusinessPriority}" Margin="2,2,10,2" Width="30"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Width="158.13">
                <TextBlock Text="Delivery Order:" Margin="10,2,2,2" Foreground="#FF4B4B62"/>
                <TextBlock Text="{Binding Path=DeliveryOrder}" Margin="2,2,2,2" Width="32"/>
            </StackPanel>
        </StackPanel>

        <TextBlock Grid.Column="0" Grid.Row="2" Text="Estimated Effort:" Margin="0,0,10,0" HorizontalAlignment="Right" Height="Auto" Foreground="#FF4B4B62" VerticalAlignment="Center" d:LayoutOverrides="Height"/>
        <TextBox AutomationProperties.AutomationId="textBoxEstimatedEffort" Grid.Column="1" Grid.Row="2" MaxWidth="50" Width="200" HorizontalAlignment="Left" Height="24" Margin="0,0,0,0" VerticalAlignment="Center" >
            <Binding Path="EstimatedEffort">
                <Binding.ValidationRules>
                    <ExceptionValidationRule />
                </Binding.ValidationRules>
            </Binding>
        </TextBox>

        <TextBlock Grid.Column="0" Grid.Row="3" Text="Comment:" Margin="0,0,10,0" HorizontalAlignment="Right" Height="Auto" Foreground="#FF4B4B62" VerticalAlignment="Center" d:LayoutOverrides="Height"/>
        <TextBox AutomationProperties.AutomationId="textBoxWorkItemComment" Grid.Column="1" Grid.Row="3"  MaxWidth="300" HorizontalAlignment="Left" Width="200" Margin="0,0,0,0" VerticalAlignment="Center" Height="24" >
            <Binding Path="Comment">
                <Binding.ValidationRules>
                    <ExceptionValidationRule />
                </Binding.ValidationRules>
            </Binding>
        </TextBox>

        <TextBlock Grid.Column="0" Grid.Row="4" Text="Description:" Margin="0,8,10,0" HorizontalAlignment="Right" Height="Auto" VerticalAlignment="Top" Foreground="#FF4B4B62" />
        <TextBox IsReadOnly="True" Background="Transparent" HorizontalAlignment="Left" MinWidth="200" Grid.Column="1" Grid.Row="4" Text="{Binding Path=Description}" TextWrapping="Wrap"  MaxHeight="50" BorderThickness="0" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" MaxWidth="300" Margin="0,0,0,0" />

        <Button AutomationProperties.AutomationId="buttonSaveWorkItem" Content="Save" Width="75" Grid.Row="5" HorizontalAlignment="Left" Click="buttonSaveWorkItemClick" Grid.Column="1" d:LayoutOverrides="HorizontalAlignment, GridBox" Height="30" VerticalAlignment="Top" />


        <Button AutomationProperties.AutomationId="buttonPreviousWorkItem" Grid.Row="5" Width="75" Height="30" Grid.Column="1" HorizontalAlignment="Right" Content="Previous" d:LayoutOverrides="HorizontalAlignment, GridBox" VerticalAlignment="Top" Click="buttonPreviousWorkItemClick" Margin="0,0,80,0" />
        <Button AutomationProperties.AutomationId="buttonNextWorkItem" Grid.Row="5" Width="75" Height="30" Grid.Column="1" HorizontalAlignment="Right" Content="Next" d:LayoutOverrides="HorizontalAlignment, GridBox" VerticalAlignment="Top" Click="buttonNextWorkItemClick" />
       
    </Grid>
</UserControl>
